package com.hzm.mapper;

import com.hzm.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select * from t_user where id=#{id}")
    User getUserById(Integer id);

    @Insert("insert into t_user (name,password,hobby) values (#{name},#{password},#{hobby})")
    int insertUser(User user);
}
